<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>无标题文档</title>
<link  id="link" href="css2.css" rel="stylesheet" type="text/css" />

</head>
<script >
	window.onload = function(){
		var btns = document.getElementsByClassName("skin");
		var link = document.getElementById("link");
		for(var i=0; i<btns.length; i++){
			btns[i].onclick = function(){
				link.href = this.getAttribute("cn");
			}
		}
	}
</script>
<body>

<dl id="message">
	<form>
		<dt>
			<strong>可以换肤的提交框：</strong>
			<input class="skin" id="btn1" cn="css1.css" type="button" value="皮肤1" />
			<input class="skin" id="btn2" cn="css2.css" type="button" value="皮肤2" />
		</dt>
		<dd>输入姓名：<input class="text" type="text" /></dd>
		<dd>输入密码：<input class="text" type="password" /></dd>
		<dd>请您留言：<textarea></textarea></dd>
		<dd class="center"><input class="btn" type="submit" value="提交" /></dd>
	</form>
</dl>

</body>
</html>
